#include<stdio.h>
int main()
{
	int n;
	int a;
	scanf_s("%d", &n)
		if (n < 10000)
		{
			int a = n / 100;
			if (a < 22)
			{
				int b = n % 100;
				printf("%d-%d", a+2000, b);
			}
			else
			{
				int c = n / 100;
				printf("%d-%d", a + 1900, c);
			}
				return 0;
		}
}